#!/bin/bash

cat $1-queries.txt | while read query;
    do
        echo "-------------------------------------------------CALLING SERVICE--------------------------------------------------------------";
        echo http://ec2-50-16-6-230.compute-1.amazonaws.com/v1/$1/${query};
        echo "----------------------------------------------------RESPONSE------------------------------------------------------------------";
        curl --digest -u $2:$3 -w '@curl-format.txt' -s "http://ec2-50-16-6-230.compute-1.amazonaws.com/v1/$1/${query}";
done;
